/**
 * Title: PhoneNumberException.java
 * Description:
 * Copyright: Copyright (c) 2008
 * Company:深圳彩讯科技有限公司
 * Author 罗旭东 (hi@luoxudong.com)
 * Date 2013-8-2 下午4:00:44
 * Version 1.0 
 */
package com.luoxudong.phonenumber.service.exception; 	

import com.luoxudong.phonenumber.service.net.http.asynchttp.model.ServerResult;
import com.luoxudong.phonenumber.service.utils.EvtLog;

/** 
 * ClassName: PhoneNumberException 
 * Description:异常处理类
 * Create by 罗旭东
 * Date 2013-8-2 下午4:00:44 
 */
public class PhoneNumberException extends RuntimeException {
	private static final String TAG = PhoneNumberException.class.getName();
	
	private static final long serialVersionUID = 1L;
	
	private int exceptionCode = -1;
	
	private ServerResult serverResult = null;

	public PhoneNumberException(String message) {
		super(message);
		EvtLog.e(TAG, message);
	}
	
	public PhoneNumberException(String message, Throwable throwable)
	{
		super(message, throwable);
		EvtLog.e(TAG, message);
	}
	
	public PhoneNumberException(int exceptionCode, Throwable throwable)
	{
		super(exceptionCode + "", throwable);
		EvtLog.e(TAG, exceptionCode + "");
		
	}
	
	public PhoneNumberException(int exceptionCode, String message)
	{
		super(exceptionCode + "" + message);
		EvtLog.e(TAG, exceptionCode + "");
		
	}
	
	public PhoneNumberException(ServerResult serverResult)
	{
		super(serverResult.getResultCode() + "" + serverResult.getResultMsg());
		this.serverResult = serverResult;
	}

	public int getExceptionCode() {
		return exceptionCode;
	}

	public void setExceptionCode(int exceptionCode) {
		this.exceptionCode = exceptionCode;
	}
	
	
}
